<?php

declare (strict_types=1);
namespace cms\exam\model;

use Carbon\Carbon;
use Hyperf\Database\Model\Relations\HasOne;

/**
 * @property int $id 
 * @property string $name 名称标识
 * @property int $status 状态,1|正常、2|禁用
 * @property Carbon $created_at 创建时间
 * @property Carbon $updated_at 更新时间
 * @property Carbon $deleted_at 删除时间
 */
class RoomModel extends CommonModel
{
    /**
     * @var string
     */
    protected $table = 'exam_room';

    protected $casts = [
        'setting' => 'array',
    ];

    public function app(): HasOne
    {
        return $this->hasOne(AppModel::class, 'id', 'app_id');
    }
}